Client/server computing has become a very popular paradigm for carrying out data processing. A client application makes a request of a server application which performs some data processing work based on the request (and sends a reply to the client if appropriate).
In a computer used as an application server, the client requests received by the server lead to the execution of application programs that carry out the work specified in the requests. The application program will execute in an environment provided by the system software of the server computer. An execution environment is characterized by the types of resources made available to the application program. The characteristics of the environment to be constructed by the server are derived from the information in the request and by the source of the request. (The information in the request might be used in conjunction with extra information in the server configuration data.) For example, the request may be related to a particular user terminal, with some data in a terminal-related piece of main storage, in which case the terminal (the source of the request), and terminal-related data, must be incorporated into the execution environment. In another example the request may be related to a socket connection to a client computer system, in which case the socket (the source of the request) must be made available to the application program via the execution environment. A functionally rich server will be able to provide a richly configurable execution environment, but the precise nature of any particular environment is determined by the information received in the request. Thus, the mechanisms to analyse the request and build the appropriate environment are crucial to the functionality of an application server.
In the prior art, application servers have been structured so that the source of the request determines the initial analysis of the client request data and that, in turn, specifically identifies the execution environment initialization that is required. In some implementations, a client request includes layered request data which is received by the application server. The application server includes a plurality of processors, each dedicated to receiving specific request data and processing this data in order to construct the execution environment within the application server. A first processor receives a request and xe2x80x9cpeels offxe2x80x9d a first layer of request data that pertains to that particular processor, carries out data processing using the first layer of the request in order to construct a specific part of the execution environment, and then passes along the request to a second processor by making a call via the interface to that processor (the processors are prearranged in a linear chain). The second processor then xe2x80x9cpeels offxe2x80x9d a second layer of request data that pertains to that second processor. This second processor then carries out data processing using the second layer of request data in order to construct another specific part of the execution environment and then passes along the request to a third processor which then xe2x80x9cpeels offxe2x80x9d a third layer of the request data, and the process continues until all of the layers of the request have been xe2x80x9cpeeled offxe2x80x9d by corresponding processors in the serial chain, resulting in a complete construction of the execution environment within an application server.
Because of their non-uniform nature, each chain of processor calls is specific to the individual request and its source. This constitutes a very inflexible way of setting up the execution environment within an application server. Because the processors must be called in a specific order, the interfaces to the processors have built-in dependencies. Therefore, the range of client requests that can be served is greatly limited because of the specific format that the requests have to adhere to in order to meet the various dependencies of the processor interfaces of the application
The present invention provides, in an application server, a system for constructing an execution environment for running an application program, the system having: a plurality of processors, each processor receiving corresponding data from a client request, modifying the execution environment based on such corresponding data from the client request and receiving and returning server data to the system; and a single interface, identical though implemented separately for each of the plurality of processors, the interface receiving client request data and server data and returning server data, such received client request data and server data being passed via the interface to the corresponding processor so that the corresponding processor can modify the execution environment based on such received data and determine server data to return via the interface; wherein each of the processors includes: a unit for receiving a call which includes client request data via the interface; a unit for processing the client request data and modifying the execution environment based upon the client request data; and a unit for determining that a further processor must be invoked, locating the further processor and invoking the further processor using the interface, passing server data and client request data corresponding to the further processor.
Preferably, each of the processors further includes a unit for continuing environment modification after the further processor has been invoked, and determining the server data to be returned by taking into account the server data returned from the further processor.
Preferably, the system further includes a request server for receiving request data from a client application, and the request server makes a call to a primary processor, the primary processor being determined by the source of the request as opposed to being determined by the contents of the client request data.
According to a second aspect, the invention provides a computer program product stored on a computer readable storage medium for, when run on a computer, carrying out the functionality of the system of the first aspect.
Thus, the invention allows the system software in the server to dynamically build and personalize the environment required to execute an application program without a specific knowledge of all the processors involved. In particular, the invention provides a mechanism to allow the components of the environment to be mixed and matched in a flexible manner. Because a uniform interface is provided for each of the processors, the processors can call each other in any order, thus allowing for great flexibility in the construction of complex execution environments. The system software need only identify the first (primary) processor based upon the source of the request to ensure correct construction. Any processor may be invoked as primary because the interface is uniform. New types of environment may be easily incorporated by combining existing processors and adding new ones.